﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;

namespace CMSMVC4.Areas.Admin.Models
{
    public class ThemTaiKhoan
    {
        [Required(ErrorMessage = "Tai Khoan Khong Duoc De Trong")]
        public string Account { get; set; }

        public string Roles { get; set; }

        public bool Admin { get; set; }

        [Required(ErrorMessage = "Email Khong Duoc De Trong")]
        [RegularExpression(@"\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*",ErrorMessage = "Email Khong Dung")]
        public string Email { get; set; }

        [Required(ErrorMessage = "Mat Khau Khong Duoc De Trong")]
        public string Pass { get; set; }

        [Compare("Pass",ErrorMessage = "Nhap Lai Mat Khau Khong Dung")]
        public string Repass { get; set; }
    }

    public class SuaTaiKhoan
    {
        [Required(ErrorMessage = "Tai Khoan Khong Duoc De Trong")]
        public string Account { get; set; }

        public string Roles { get; set; }

        public bool Admin { get; set; }

        [Required(ErrorMessage = "Email Khong Duoc De Trong")]
        [RegularExpression(@"\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*", ErrorMessage = "Email Khong Dung")]
        public string Email { get; set; }

        public string Pass { get; set; }

        [Compare("Pass", ErrorMessage = "Nhap Lai Mat Khau Khong Dung")]
        public string Repass { get; set; }
    }
}